class MineInfo:
    """Python port of Patric Jensfelts MineInfo.java by Simon Pettersson"""
    SQUARE_INFO = 1
    ILLEGAL_MOVE = 2
    ALREADY_OPEN = 3
    PLAYER_STOPPED = 4
    UNKNOWN_CMD = 5
    SCORE = 6
    ALREADY_PEEKED = 7

    def __init__(self):
        # The type of info, SQUARE_INFO, PLAYER_STOPS, etc
        self.infoType = 0

        # This variable gives the ID of the player that resulted in this
        # info by opening a square or stopping
        self.playerId = 0

        # Specifies what square
        self.X = 0
        self.Y = 0

        # 0-8 for number of mines around
        # -1 for mine that just killed you
        # -2 for mine that occured before the game started and thus does
        #  not kill you
        # -10 square outside mine field
        self.value = -11
        
        # The score in case of a SCORE message
        self.score = 0
        
        self.unknownCommand = 0
        
